import React from 'react';
import ReactDom from 'react-dom';



let element = React.createElement("h1",{id:'title'},'hello',React.createElement('h2',null,'world'));
//jsx更像js而非HTML
//React如何区分是jsx元素还是表达式？
//< 开头就是JSX元素，{}就是表达式
const name = 'world';
let element1 = <h1 id="title">hello {name}</h1>;//jsx
console.log(element);
ReactDom.render(
  element1,
  document.getElementById('root')
)